package com.stlm2.dems.entity;

/**
 * Created by apple on 2017/10/20.
 */
public enum DeliveryType {
    SelfPickup(1) {
        public String toString() {
            return "到店自取";
        }
    },
    Delivery(2) {
        public String toString() {
            return "送货上门";
        }
    };

    private final int val;

    DeliveryType(int n) {
        val = n;
    }

    public int getIntValue() {
        return val;
    }

    public static DeliveryType getByIntValue(int n) {
        switch (n) {
            case 1:
                return SelfPickup;
            case 2:
                return Delivery;
            default:
                return null;
        }
    }
}
